/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 17655
 * Date: 2025-01-09
 * Time: 20:21
 */
public class test1 {
    /*
    LeetCode 392 判断子序列
     */
    public boolean isSubsequence(String s, String t) {
        int n = s.length();
        int m = t.length();
        int i=0,j=0;
        while(i<n && j<m){
            if(s.charAt(i)==t.charAt(j)){
                i++;
            }
            j++;
        }
        return i==n;
    }
}
